#include <stdio.h>
void bubble_sort(int arr[], int sz) 
{
	int i = 0;
	int judge = 0;
	for (i = 0; i < sz - 1; i++) 
	{
		int j = 0;
		for (j = 0; j <sz-1-i ; j++) 
		{
			if (arr[j] > arr[j + 1]) 
			{
				int temp = arr[j];
				arr[j] = arr[j + 1];
				arr[j + 1] = temp;
				judge = 1;
			}
		}
		if (judge == 0) 
		{
			break;
		}
	}
}
void main() 
{
	int i = 0;
	int arr[] = {9,8,7,6,5,4,3,2,1,0,};
	bubble_sort(arr,sizeof(arr)/sizeof(arr[0]));
	for (i = 0; i < sizeof(arr) / sizeof(arr[0]); i++) 
	{
		printf("%d ",arr[i]);
	}
}